import { request } from '@/utils/request'

// 查询部门经办人列表
export function listDeptHandled(query) {
  return request({
    url: '/common/deptHandled/list',
    method: 'get',
    params: query
  })
}

// 查询部门经办人列表
export function listDeptHandledAll(query) {
  return request({
    url: '/common/deptHandled/list/all',
    method: 'get',
    params: query
  })
}

// 查询部门经办人详细
export function getDeptHandled(id) {
  return request({
    url: '/common/deptHandled/' + id,
    method: 'get'
  })
}

// 新增部门经办人
export function addDeptHandled(data) {
  return request({
    url: '/common/deptHandled/add',
    method: 'post',
    data: data
  },{
    successMsg:"操作成功！"
  })
}

// 修改部门经办人
export function updateDeptHandled(data) {
  return request({
    url: '/common/deptHandled/update',
    method: 'put',
    data: data
  },{
    successMsg:"操作成功！"
  })
}

// 根据部门id获取部门经办人
export function getDeptHandledInfoByDeptId(deptId) {
  return request({
    url: '/common/deptHandled/getDeptHandledInfoByDeptId/' + deptId,
    method: 'get',
  })
}